#define  _CRT_SECURE_NO_WARNINGS



#include<stdio.h>
#include<string.h>

int fun(char* arr)
{
	int i = 0, len = strlen(arr);
	for (i = 0; i <= len / 2; i++)
	{
		if (*(arr + i) != *(arr + len - i - 1))
			return 0;
	}
	return 1;
}
int main()
{
	char arr[501] = { 0 }, str[501] = { 0 };
	scanf("%s", arr);
	int len = strlen(arr), i = 0, j = 0, a = 0, temp = 0, b = 2, k = 0, c = 0, d = 0;
	a = len - 1;
	for (i = 0; i < len - 1; i++)
	{
		c = 0;
		for (j = 0; j < a; j++)
		{
			temp = b;
			d = 0;
			for (k = c; temp; k++)
			{
				str[d++] = arr[k];
				temp--;
			}
			if (fun(str) == 1)
				puts(str);
			c++;
		}
		a--;
		b++;
	}
	
	return 0;
}